package com.etc.service.impl;

import java.util.List;

import com.etc.dao.impl.BusDaoImpl;
import com.etc.entity.Bus;
import com.etc.entity.BusInfo;
import com.etc.service.BusService;
import com.etc.util.PageData;

public class BusServiceImpl implements BusService{

	//创建dao对象
	BusDaoImpl dao=new BusDaoImpl();
	
	//实现车辆增加方法
	@Override
	public boolean insertBus(Bus bus) {		
		return dao.insertBus(bus);
	}
	
	//实现删除方法
	@Override
	public boolean delBus(int id) {
		// TODO Auto-generated method stub
		return dao.delBus(id);
	}

	//实现修改车辆信息
	@Override
	public boolean updateBus(BusInfo busInfo) {
		// TODO Auto-generated method stub
		return dao.updateBus(busInfo);
	}

	//查询
	@Override
	public List<Bus> queryBus() {
		// TODO Auto-generated method stub
		return dao.queryBus();
	}

	@Override
	public PageData getBusByLikeAndLimit(int pageNo, int pageSize) {
		// TODO Auto-generated method stub
		return dao.queryBusByLikeAndLimit(pageNo, pageSize);
	}

	@Override
	public int getSiteId(String name) {
		// TODO Auto-generated method stub
		return dao.querySiteId(name);
	}

	@Override
	public List<BusInfo> getBusIdAndEnd(String name) {
		// TODO Auto-generated method stub
		return dao.queryBusIdAndEnd(name);
	}

	@Override
	public List<String> getBusRoute(int b_id) {
		// TODO Auto-generated method stub
		return dao.queryBusRoute(b_id);
	}

}
